package com.android.common.mvp.view.activity;

import android.view.KeyEvent;
import androidx.fragment.app.FragmentTransaction;
import com.android.common.R;
import com.android.common.base.BaseActivity;
import com.android.common.mvp.view.webview.BaseWebViewFragment;

public class WebViewActivity extends BaseActivity {

    private BaseWebViewFragment mFragment;

    @Override
    protected int onSetRootViewId() {
        return R.layout.common_content;
    }

    @Override
    protected void onInitFragment() {
        super.onInitFragment();
        mFragment = new BaseWebViewFragment();
        mFragment.setArguments(mBundle);
        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        ft.add(R.id.fl_content, mFragment);
        ft.commit();
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        return mFragment.onKeyDown(keyCode,event);
    }
}